<%@ include file="/WEB-INF/jsp/include/head.jsp" %><%@ page language="java" pageEncoding="UTF-8"%>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<%@ include file="/WEB-INF/jsp/include/title.jsp" %>
	<%@ include file="/WEB-INF/jsp/include/common_css.jsp" %>
	<%@ include file="/WEB-INF/jsp/include/common_script.jsp" %>
	<script type="text/javascript">
	//<![CDATA[
	function checkedAll() {
		if($("#checkedSid").attr("checked")) {
			$("input:checkbox:not(checked)").attr("checked", "checked");
		} else {
			$("input:checkbox:checked").attr("checked", "");
		}
	}

	function findFriends() {
		$.get("<c:url value='/common/friends.html'/>",
			function(data) {
				$("#treeView").html(data);
			});
	}

	$(document).ready(findFriends);	
	//]]>
	</script>
</head>
<body>
<%@ include file="/WEB-INF/jsp/include/top.jsp" %>
	<div><spring:message code="label.question.share"/></div>
	<div>
		<input type="text" />
		<input type="button" value="search" />
		<div id="treeView"></div>
	</div>
	<div id="subContentsView">
		<table width="100%">
			<tr>
				<td><input type="checkbox" id="checkedSid" name="checkedSid" value="0" onclick="javascript:checkedAll();" /></td>
				<td><spring:message code="question.question" /></td>
				<td><spring:message code="question.grade" /></td>
				<td><spring:message code="question.example" /></td>
				<td><spring:message code="question.patternCode" /></td>
				<td><spring:message code="question.hearingYn" /></td>
				<td><spring:message code="question.classification" /></td>
				<td></td>
			</tr>	
			<c:forEach items="${list}" var="question" varStatus="status">
			<tr>
				<td><input type="checkbox" name="sid" value="${question.sid}" /></td>
				<td><a href="<c:url value="/question/update.html?sid=${question.sid}"/>">${question.question}</a></td>
				<td><spring:message code="${question.grade}" /></td>
				<td>${question.example}</td>
				<td><spring:message code="${question.patternCode}" /></td>
				<td>${question.hearingYn}</td>
				<td><spring:message code="${question.classification}" /></td>
				<td><a href="<c:url value="/question/remove.html?sid=${question.sid}&amp;patternCode=${question.patternCode}"/>">X</a></td>				
			</tr>
			</c:forEach>
		</table>
	</div>
	<div id="subMenuView"><a href="<c:url value="/question/list.html"/>"><spring:message code="button.list"/></a></div>
<%@ include file="/WEB-INF/jsp/include/footer.jsp" %>	
</body>	
</html>